//index.js
//获取应用实例
const app = getApp()

Page({
  data: {
    hidden: true,
    searchval:''
  },
  //事件处理函数
  bindViewTap: function () {
    wx.navigateTo({
      url: '../logs/logs'
    })
  },
  onLoad: function () {
    
  },
  clearHistory:function(){
    var that=this;
    that.setData({
      hidden: false

    })
  },
  searchBtn : function(e){ 
    console.log(e.detail.value);
    wx.setStorageSync("searchval", e.detail.value);
    // 未搜索到相关信息
    wx.navigateTo({
      url: '../searchnull/searchnull'
    })
    // 搜索成功
    // wx.navigateTo({
    //   url: '../searchsuccess/searchsuccess'
    // })
  }
  ,
  goSearchs:function(e){
    console.log(e.currentTarget.dataset.url);
    wx.setStorageSync("searchval", e.currentTarget.dataset.val);
    wx.navigateTo({
      url: e.currentTarget.dataset.url
    })
  }
})
